Skip to main content

mobileCurrentLocation

Type

function

Summary

Returns the current location of the device.

Syntax

mobileCurrentLocation()

Description

Use the mobileCurrentLocation function to find the current location of the device.

Use the mobileCurrentLocation function to find the current location of the device. If location tracking has not been enabled this function returns empty. Otherwise it returns an array.

note

: Before using the mobileCurrentLocation function, the mobileSensorAvailable function should first be called with the line:

    mobileSensorAvailable(\"location\")

Doing this will request the necessary permissions for using location sensors.

Examples

put mobileCurrentLocation() into theLocation

command: mobileStopTrackingSensor, mobileStartTrackingSensor

function: mobileSensorAvailable, mobileSensorReading

message: trackingError, locationChanged

Compatibility and Support

Introduced

LiveCode 4.5.2

OS

ios

android

Platforms

mobile

Thank you for your feedback!

Was this page helpful?